<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // var a = prompt('qingshuru');
        // alert(a);
        // let b = prompt('请输入姓名：');
        // alert('你好' + b);

        var aa = 0,
            ba = 1,
            ca = 2;
        
        console.log(aa + ba + ca);

        console.log(isNaN(undefined)); // true
        console.log(isNaN(null)); // false
        console.log(isNaN(NaN)); // true
        console.log(isNaN(false)); // false
        console.log(typeof(isNaN(true))); // boolean
        console.log(typeof(typeof(isNaN('nihao'))));
        // 任何类型的值和字符串相加结果都是字符串
        console.log(undefined + 1)  // NaN
        console.log(null + 1)  // 1
        console.log(undefined + 'hhh')  // undefinedhhh
        console.log(true + 1)  //2 

        var num = parseInt(prompt('nihao'));
        // parseInt() 截取最前面的数字转换为整数 不接受小数 如果输入的是纯数字得到 NaN
        console.log(num);
        console.log(parseFloat(prompt('float')))
        // + 有一个加数是字符串就会隐式转换其他参数为字符串
        // - * / 隐式转换为 Number 类型 
    </script>
</body>
</html>